VERSION 5.00
Object = "{736A8444-E374-41A8-B526-1B07FD2F3F5B}#1.0#0"; "BLacKPeaRLOCX.ocx"
Begin VB.Form FrmJual 
   BackColor       =   &H00000000&
   BorderStyle     =   0  'None
   Caption         =   "Laporan Penjualan"
   ClientHeight    =   6000
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   3480
   ForeColor       =   &H0000C000&
   Icon            =   "FrmJual.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   6000
   ScaleWidth      =   3480
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox tgl 
      Height          =   285
      Left            =   3600
      TabIndex        =   16
      Top             =   9720
      Width           =   1455
   End
   Begin BLacKPeaRLOCX.BLacKFrame framelap 
      Height          =   6015
      Left            =   0
      TabIndex        =   17
      Top             =   0
      Width           =   3495
      _ExtentX        =   6165
      _ExtentY        =   10610
      BackColor1      =   0
      BackColor2      =   4210752
      Caption         =   "Preview"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   49152
      TitleColor1     =   0
      TitleColor2     =   4210752
      TitleGradient   =   2
      TitleHeight     =   350
      BorderColor     =   49152
      BorderWidth     =   2
      Begin VB.PictureBox Picture1 
         Appearance      =   0  'Flat
         BackColor       =   &H00000000&
         ForeColor       =   &H80000008&
         Height          =   1935
         Left            =   240
         ScaleHeight     =   1905
         ScaleWidth      =   2985
         TabIndex        =   19
         Top             =   3120
         Width           =   3015
         Begin VB.OptionButton opall 
            BackColor       =   &H00000000&
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   120
            TabIndex        =   14
            Top             =   1560
            Value           =   -1  'True
            Width           =   255
         End
         Begin VB.ComboBox txtnama 
            BackColor       =   &H00000000&
            ForeColor       =   &H0000C000&
            Height          =   315
            Left            =   120
            TabIndex        =   11
            Top             =   480
            Width           =   2175
         End
         Begin VB.ComboBox txtjenis 
            BackColor       =   &H00000000&
            ForeColor       =   &H0000C000&
            Height          =   315
            Left            =   120
            TabIndex        =   13
            Text            =   "Jasa"
            Top             =   1200
            Width           =   1455
         End
         Begin VB.OptionButton opjasa 
            BackColor       =   &H00000000&
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   120
            TabIndex        =   12
            Top             =   840
            Width           =   255
         End
         Begin VB.OptionButton opnama 
            BackColor       =   &H00000000&
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   120
            TabIndex        =   10
            Top             =   120
            Width           =   255
         End
         Begin VB.Label Label3 
            BackStyle       =   0  'Transparent
            Caption         =   "All"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   360
            TabIndex        =   22
            Top             =   1560
            Width           =   2055
         End
         Begin VB.Label Label2 
            BackStyle       =   0  'Transparent
            Caption         =   "Berdasarkan Jenis"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   360
            TabIndex        =   21
            Top             =   840
            Width           =   2055
         End
         Begin VB.Label Label1 
            BackStyle       =   0  'Transparent
            Caption         =   "Berdasarkan nama Barang"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   360
            TabIndex        =   20
            Top             =   120
            Width           =   2055
         End
      End
      Begin VB.OptionButton opbln 
         BackColor       =   &H00000000&
         ForeColor       =   &H0000C000&
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   1440
         Width           =   255
      End
      Begin VB.OptionButton opthn 
         BackColor       =   &H00191919&
         ForeColor       =   &H0000C000&
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   2280
         Width           =   255
      End
      Begin VB.OptionButton optgl 
         BackColor       =   &H00000000&
         ForeColor       =   &H0000C000&
         Height          =   255
         Left            =   240
         TabIndex        =   0
         Top             =   600
         Value           =   -1  'True
         Width           =   255
      End
      Begin BLacKPeaRLOCX.ButtonNix ButtonNix1 
         Height          =   495
         Left            =   1920
         TabIndex        =   18
         Top             =   5280
         Width           =   1215
         _ExtentX        =   2143
         _ExtentY        =   873
         BTYPE           =   5
         TX              =   "Tutup"
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmJual.frx":B532
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin VB.ComboBox txtthn2 
         BackColor       =   &H00000000&
         ForeColor       =   &H0000C000&
         Height          =   315
         Left            =   240
         TabIndex        =   9
         Top             =   2640
         Width           =   1095
      End
      Begin VB.ComboBox txtthn1 
         BackColor       =   &H00000000&
         ForeColor       =   &H0000C000&
         Height          =   315
         Left            =   960
         TabIndex        =   7
         Top             =   1800
         Width           =   1095
      End
      Begin VB.ComboBox txtbln1 
         Appearance      =   0  'Flat
         BackColor       =   &H00000000&
         ForeColor       =   &H0000C000&
         Height          =   315
         Left            =   240
         TabIndex        =   6
         Top             =   1800
         Width           =   735
      End
      Begin VB.ComboBox TxtTgl 
         Appearance      =   0  'Flat
         BackColor       =   &H00000000&
         ForeColor       =   &H0000C000&
         Height          =   315
         Left            =   240
         TabIndex        =   1
         Top             =   960
         Width           =   735
      End
      Begin VB.ComboBox TxtBln 
         BackColor       =   &H00000000&
         ForeColor       =   &H0000C000&
         Height          =   315
         Left            =   960
         TabIndex        =   2
         Top             =   960
         Width           =   735
      End
      Begin VB.ComboBox TxtThn 
         BackColor       =   &H00000000&
         ForeColor       =   &H0000C000&
         Height          =   315
         Left            =   1680
         TabIndex        =   3
         Top             =   960
         Width           =   1095
      End
      Begin BLacKPeaRLOCX.ButtonNix CmdPrev 
         Height          =   495
         Left            =   240
         TabIndex        =   15
         Top             =   5280
         Width           =   1215
         _ExtentX        =   2143
         _ExtentY        =   873
         BTYPE           =   5
         TX              =   "Preview"
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmJual.frx":B54E
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         Caption         =   "Pertahun"
         ForeColor       =   &H0000C000&
         Height          =   255
         Left            =   480
         TabIndex        =   24
         Top             =   2280
         Width           =   2055
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "Perbulan"
         ForeColor       =   &H0000C000&
         Height          =   255
         Left            =   480
         TabIndex        =   23
         Top             =   1440
         Width           =   2055
      End
      Begin VB.Label Label4 
         BackStyle       =   0  'Transparent
         Caption         =   "Pertanggal"
         ForeColor       =   &H0000C000&
         Height          =   255
         Left            =   480
         TabIndex        =   4
         Top             =   600
         Width           =   2055
      End
      Begin VB.Shape Shape1 
         BorderColor     =   &H0000C000&
         BorderWidth     =   5
         Height          =   1935
         Left            =   240
         Top             =   3120
         Width           =   3015
      End
   End
End
Attribute VB_Name = "FrmJual"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub ButtonNix1_Click()
Unload Me
End Sub

Private Sub CmdPrev_Click()
If framelap.Caption = "Laporan Penjualan" Then
lappen
ElseIf framelap.Caption = "Laporan Pembelian" Then
lappem
End If
End Sub
Private Sub lappen()
On Error GoTo hell
Dim lokasidata As String
Dim user As String
Dim namadata As String
Dim pass As String
Dim port As String
Dim datver As String
datver = FrmDatabases.txtdatabases.Text
lokasidata = FrmDatabases.txtlokda.Text
user = FrmDatabases.TxtUser.Text
namadata = FrmDatabases.txtnameda.Text
pass = FrmDatabases.txtpass.Text
port = FrmDatabases.txtport

LapPenj.DataControl1.CursorLocation = ddADOUseClient
LapPenj.DataControl1.ConnectionString = "Driver=" & datver & ";SERVER=" & lokasidata & ";PORT=" & port & ";DATABASE=" & namadata & ";USER=" & user & ";PASSWORD=" & pass & ";OPTION=3;"
 
If optgl.value = True Then
If opall.value = True Then
LapPenj.DataControl1.Source = "Select * from penjualan where penjualan.tgl='" & TxtTgl.Text & "' and penjualan.bln='" & TxtBln.Text & "' and penjualan.thn='" & TxtThn.Text & "' and penjualan.stat='" & "Approve" & "' and penjualan.cls ='" & "Yes" & "'"

ElseIf opjasa.value = True Then
LapPenj.DataControl1.Source = "Select * from penjualan where penjualan.tgl='" & TxtTgl.Text & "' and penjualan.bln='" & TxtBln.Text & "' and penjualan.thn='" & TxtThn.Text & "' and penjualan.jenis='" & txtjenis.Text & "'and penjualan.stat='" & "Approve" & "' and penjualan.cls ='" & "Yes" & "'"

ElseIf opnama.value = True Then
LapPenj.DataControl1.Source = "Select * from penjualan where penjualan.tgl='" & TxtTgl.Text & "' and penjualan.bln='" & TxtBln.Text & "' and penjualan.thn='" & TxtThn.Text & "' and penjualan.namabarang='" & txtnama.Text & "'and penjualan.stat='" & "Approve" & "' and penjualan.cls ='" & "Yes" & "'"
End If


ElseIf opbln.value = True Then
If opall.value = True Then
LapPenj.DataControl1.Source = "Select * from penjualan where  penjualan.bln='" & txtbln1.Text & "' and penjualan.thn='" & txtthn1.Text & "'and penjualan.stat='" & "Approve" & "' and penjualan.cls ='" & "Yes" & "'"

ElseIf opjasa.value = True Then
LapPenj.DataControl1.Source = "Select * from penjualan where  penjualan.bln='" & txtbln1.Text & "' and penjualan.thn='" & txtthn1.Text & "' and penjualan.jenis='" & txtjenis.Text & "'and penjualan.stat='" & "Approve" & "' and penjualan.cls ='" & "Yes" & "'"

ElseIf opnama.value = True Then
LapPenj.DataControl1.Source = "Select * from penjualan where  penjualan.bln='" & txtbln1.Text & "' and penjualan.thn='" & txtthn1.Text & "' and penjualan.namabarang='" & txtnama.Text & "'and penjualan.stat='" & "Approve" & "' and penjualan.cls ='" & "Yes" & "'"
End If


ElseIf opthn.value = True Then
If opall.value = True Then
LapPenj.DataControl1.Source = "Select * from penjualan where penjualan.thn='" & txtthn2.Text & "'and penjualan.stat='" & "Approve" & "' and penjualan.cls ='" & "Yes" & "'"

ElseIf opjasa.value = True Then
LapPenj.DataControl1.Source = "Select * from penjualan where penjualan.thn='" & txtthn2.Text & "' and penjualan.jenis='" & txtjenis.Text & "'and penjualan.stat='" & "Approve" & "' and penjualan.cls ='" & "Yes" & "'"

ElseIf opnama.value = True Then
LapPenj.DataControl1.Source = "Select * from penjualan where  penjualan.thn='" & txtthn2.Text & "' and penjualan.namabarang='" & txtnama.Text & "'and penjualan.stat='" & "Approve" & "' and penjualan.cls ='" & "Yes" & "'"
End If
End If

Unload Me
LapPenj.Nama_Toko.Caption = FrmMain.Txtnama_warnet.Caption
LapPenj.Alamat.Caption = FrmMain.Txtalamat1.Caption
LapPenj.Keterangan.Caption = FrmMain.Txtalamat2.Caption
LapPenj.Image1.Picture = FrmMain.ImgLogo.Picture
LapPenj.Visible = True
IfNoErr:
Exit Sub
hell:
 TulisError Err.Description, Err.Number, "lappen", Me.Name
 Resume IfNoErr

End Sub


Private Sub lappem()
On Error GoTo hell
Dim lokasidata As String
Dim user As String
Dim namadata As String
Dim pass As String
Dim port As String
Dim datver As String
datver = FrmDatabases.txtdatabases.Text
lokasidata = FrmDatabases.txtlokda.Text
user = FrmDatabases.TxtUser.Text
namadata = FrmDatabases.txtnameda.Text
pass = FrmDatabases.txtpass.Text
port = FrmDatabases.txtport

LapPemb.DataControl1.CursorLocation = ddADOUseClient
LapPemb.DataControl1.ConnectionString = "Driver=" & datver & ";SERVER=" & lokasidata & ";PORT=" & port & ";DATABASE=" & namadata & ";USER=" & user & ";PASSWORD=" & pass & ";OPTION=3;"
 
If optgl.value = True Then
If opall.value = True Then
LapPemb.DataControl1.Source = "Select * from pembelian where pembelian.tgl='" & TxtTgl.Text & "' and pembelian.bln='" & TxtBln.Text & "' and pembelian.thn='" & TxtThn.Text & "'"

ElseIf opnama.value = True Then
LapPemb.DataControl1.Source = "Select * from pembelian where pembelian.tgl='" & TxtTgl.Text & "' and pembelian.bln='" & TxtBln.Text & "' and pembelian.thn='" & TxtThn.Text & "' and pembelian.namabarang='" & txtnama.Text & "'"
End If

ElseIf opbln.value = True Then
If opall.value = True Then
LapPemb.DataControl1.Source = "Select * from pembelian where  pembelian.bln='" & txtbln1.Text & "' and pembelian.thn='" & txtthn1.Text & "'and pembelian.stat='" & "Approve" & "' and pembelian.cls ='" & "Yes" & "'"

ElseIf opnama.value = True Then
LapPemb.DataControl1.Source = "Select * from pembelian where  pembelian.bln='" & txtbln1.Text & "' and pembelian.thn='" & txtthn1.Text & "' and pembelian.namabarang='" & txtnama.Text & "'"
End If


ElseIf opthn.value = True Then
If opall.value = True Then
LapPemb.DataControl1.Source = "Select * from pembelian where pembelian.thn='" & txtthn2.Text & "'"

ElseIf opnama.value = True Then
LapPemb.DataControl1.Source = "Select * from pembelian where  pembelian.thn='" & txtthn2.Text & "' and pembelian.namabarang='" & txtnama.Text & "'"
End If
End If

Unload Me
LapPemb.Nama_Toko.Caption = FrmMain.Txtnama_warnet.Caption
LapPemb.Alamat.Caption = FrmMain.Txtalamat1.Caption
LapPemb.Keterangan.Caption = FrmMain.Txtalamat2.Caption
LapPemb.Image1.Picture = FrmMain.ImgLogo.Picture
LapPemb.Visible = True

IfNoErr:
Exit Sub
hell:
 TulisError Err.Description, Err.Number, "lappem", Me.Name
 Resume IfNoErr

End Sub
Private Sub Form_Load()


TxtTgl.AddItem "01"
TxtTgl.AddItem "02"
TxtTgl.AddItem "03"
TxtTgl.AddItem "04"
TxtTgl.AddItem "05"
TxtTgl.AddItem "06"
TxtTgl.AddItem "07"
TxtTgl.AddItem "08"
TxtTgl.AddItem "09"
TxtTgl.AddItem "10"
TxtTgl.AddItem "11"
TxtTgl.AddItem "12"
TxtTgl.AddItem "13"
TxtTgl.AddItem "14"
TxtTgl.AddItem "15"
TxtTgl.AddItem "16"
TxtTgl.AddItem "17"
TxtTgl.AddItem "18"
TxtTgl.AddItem "19"
TxtTgl.AddItem "20"
TxtTgl.AddItem "21"
TxtTgl.AddItem "22"
TxtTgl.AddItem "23"
TxtTgl.AddItem "24"
TxtTgl.AddItem "25"
TxtTgl.AddItem "26"
TxtTgl.AddItem "27"
TxtTgl.AddItem "28"
TxtTgl.AddItem "29"
TxtTgl.AddItem "30"
TxtTgl.AddItem "31"

opnama.Forecolor = vbGreen
txtbln1.AddItem "01"
txtbln1.AddItem "02"
txtbln1.AddItem "03"
txtbln1.AddItem "04"
txtbln1.AddItem "05"
txtbln1.AddItem "06"
txtbln1.AddItem "07"
txtbln1.AddItem "08"
txtbln1.AddItem "09"
txtbln1.AddItem "10"
txtbln1.AddItem "11"
txtbln1.AddItem "12"

TxtBln.AddItem "01"
TxtBln.AddItem "02"
TxtBln.AddItem "03"
TxtBln.AddItem "04"
TxtBln.AddItem "05"
TxtBln.AddItem "06"
TxtBln.AddItem "07"
TxtBln.AddItem "08"
TxtBln.AddItem "09"
TxtBln.AddItem "10"
TxtBln.AddItem "11"
TxtBln.AddItem "12"

TxtTgl.Text = Format(Now, "DD")
TxtBln.Text = Format(Now, "MM")
txtbln1.Text = Format(Now, "MM")
TxtThn.Text = Format(Now, "YYYY")
txtthn1.Text = Format(Now, "YYYY")
txtthn2.Text = Format(Now, "YYYY")
txtjenis.AddItem "Jasa"
txtjenis.AddItem "Non Jasa"
StyleS
End Sub

Private Sub StyleS()
On Error Resume Next
Dim ctrl As Control
For Each ctrl In Controls
If FrmStyles.txtnamastyle.Text = "Default" Then
Exit Sub
Else
    If (TypeOf ctrl Is ButtonNix) And _
        ctrl.Name <> "cmdSwitchStyle" Then
        ctrl.ButtonType = FrmStyles.txtlButtonType.Text
        ctrl.ColorScheme = FrmStyles.txtlColorScheme.Text
        ctrl.Backcolor = FrmStyles.txtlBackcolor.Text
        ctrl.BackOver = FrmStyles.txtlBackOver.Text
        ctrl.Forecolor = FrmStyles.txtlForecolor.Text
        ctrl.ForeOver = FrmStyles.txtlForeOver.Text
       
    End If
        If (TypeOf ctrl Is BLacKFrame) And _
        ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.BackColor1 = FrmStyles.frameBackColor1.Text
         ctrl.BackColor2 = FrmStyles.frameBackColor2.Text
         ctrl.BorderColor = FrmStyles.frameBorderColor.Text
         ctrl.Forecolor = FrmStyles.frameForecolor.Text
         ctrl.TitleColor1 = FrmStyles.frameTitleColor1.Text
         ctrl.TitleColor2 = FrmStyles.frameTitleColor2.Text
         If FrmStyles.frameBackGradient.Text = 0 Then
         ctrl.BackGradient = None
         ElseIf FrmStyles.frameBackGradient.Text = 1 Then
         ctrl.BackGradient = Vertical
         ElseIf FrmStyles.frameBackGradient.Text = 2 Then
         ctrl.BackGradient = Horizontal
         End If
         
         If FrmStyles.Frametitlegradient.Text = 0 Then
         ctrl.TitleGradient = None
         ElseIf FrmStyles.Frametitlegradient.Text = 1 Then
         ctrl.TitleGradient = Vertical
         ElseIf FrmStyles.Frametitlegradient.Text = 2 Then
         ctrl.TitleGradient = Horizontal
         End If

    End If
        If (TypeOf ctrl Is BLacKText) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.TForecolor.Text
         ctrl.Backcolor = FrmStyles.TBackcolor.Text
         ctrl.BackColorMain = FrmStyles.TBackColorMain.Text
         ctrl.BorderColor = FrmStyles.TBorderColor.Text
         ctrl.FocusBackColor = FrmStyles.TFocusBackColor.Text
         ctrl.FocusBackMainColor = FrmStyles.TFocusBackMainColor.Text
         ctrl.FocusBorderColor = FrmStyles.TFocusBorderColor.Text
         ctrl.FocusForeColor = FrmStyles.TFocusForeColor.Text
    End If
        If (TypeOf ctrl Is MSFlexGrid) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.GDBackcolor.Text
         ctrl.BackColorBkg = FrmStyles.GDBackColorBkg.Text
         ctrl.BackColorSel = FrmStyles.GDBackColorSel.Text
         ctrl.BackColorFixed = FrmStyles.GDBackColorFixed.Text
         ctrl.ForeColorSel = FrmStyles.GDForeColorSel.Text
         ctrl.Forecolor = FrmStyles.GDForecolor.Text
         ctrl.ForeColorFixed = FrmStyles.GDForeColorFixed.Text
         ctrl.GridColor = FrmStyles.GDGridColor.Text
         ctrl.GridColorFixed = FrmStyles.GDGridColorFixed.Text
    End If
        If (TypeOf ctrl Is TextBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.lbltextfore.Text
         ctrl.Backcolor = FrmStyles.lbltextback.Text
    End If
        If (TypeOf ctrl Is ComboBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.cboForeColor.Text
         ctrl.Backcolor = FrmStyles.cboBackcolor.Text
    End If
        If (TypeOf ctrl Is Label) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.lblForeColor.Text
    End If
        If (TypeOf ctrl Is RichTextBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.RcBackcolor.Text
    End If
    
            If (TypeOf ctrl Is OptionButton) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.opForecolor.Text
         ctrl.Backcolor = FrmStyles.opBackcolor.Text
    End If
            If (TypeOf ctrl Is ListView) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.LBackColor.Text
    End If
    Me.Backcolor = FrmStyles.WFore.Text
    End If
Next ctrl
End Sub
